package com.xinzhi.service.impl;

import com.xinzhi.mapper.QianshouMapper;
import com.xinzhi.service.QianshouService;
import com.xinzhi.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class QianshouServiceImpl implements QianshouService {
    @Autowired
    private QianshouMapper qianshouMapper;


    @Override
    public Result addQianshou(String qianshou, String two_index) {
          if (qianshou == null || two_index == null){
              return Result.error("新增内容不能为空");
          }
        int i = qianshouMapper.addQianshou(qianshou);
        int i1 = qianshouMapper.addTwo(two_index);
        return i>0 || i1 >0 ? Result.ok("新增成功") : Result.error("新增失败");
    }
}
